From 68e69e3a1268d67b857b5b7cef12faa91c83a629 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Tue, 19 Feb 2008 12:50:08 +0000 Subject: [PATCH] make the testbuffer contain values in the range -0.25 .. 1.75 instead of * babl/babl-fish-path.c: (test_create): make the testbuffer contain values in the range -0.25 .. 1.75 instead of 0.0 .. 1.0, might fix issues with wrong clamping of float->8bit conversions. svn path=/trunk/; revision=279 --- ChangeLog | 6 ++++++ babl/babl-fish-path.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c6e5a66..66b0b5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-02-19 Øyvind Kolås + + * babl/babl-fish-path.c: (test_create): make the testbuffer contain + values in the range -0.25 .. 1.75 instead of 0.0 .. 1.0, might fix + issues with wrong clamping of float->8bit conversions. + 2008-02-15 Øyvind Kolås * configure.ac: cleaned up win32 detection vs plug-in compilation diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index 666c38b..785a8d3 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -437,7 +437,7 @@ test_create (void) test = babl_malloc (sizeof (double) * test_pixels * 4); for (i = 0; i < test_pixels * 4; i++) - test [i] = (double) random () / RAND_MAX; + test [i] = ((double) random () / RAND_MAX) * 2 - 0.25; return test; } -- 2.30.2